The West Saxons continued to try and defend their lands under Alfred’s command, however he was defeated in Wilton a few weeks after his accession to the throne by the enlarged Viking army. The Viking forces had seemed to break under the attack of the forces under Alfred, however this was a ruse and the Viking forces reformed their lines and were able to win the battle, slaughtering the out of formation soldiers.

After this battle Alfred made a truce with the Viking forces in return for a financial settlement and for a time there was peace between the two. The Vikings withdrew from Wessex and made a base in London. They then travelled to put down a rebellion against their puppet king in Northumbria, before going to Torksey in Mercia. In 873 the Mercians paid the Vikings to leave their territory, who relocated moved to Repton, a village in Derbyshire.

In 875 the Viking forces split with Halfdan leading a group north, whilst Guthrum, a powerful Viking leader, lead the other contigent to Cambridge in the south.

The Vikings returned again to Wessex in 875 under Guthrum and set up camp in Wareham, deep in West Saxon territory. Alfred met with the Vikings led by Guthrum and looked to avoid hostilities. Hostages and oaths were exchanged between the two sides as Alfred's men surrounded the Viking encampment. The Vikings promising to leave Wessex, however they did not keep this promise, slaughtering the hostages given by Alfred and moved further west and established themselves in Exeter during 876-7.


https://upload.wikimedia.org/wikipedia/commons/thumb/3/35/England_Great_Army_map.svg/512px-England_Great_Army_map.svg.png
Map showing the movements of Viking forces throughout England up to the Battle of Edington

The reinforcements the Vikings expected to come by sea were largely wrecked in a storm, and so they found themselves once again trapped by Alfred's besieging forces, this time in Exeter. Alfred again came to an agreement with them, which, this time, the Viking adhered to. They moved out of Wessex to Gloucester in Mercia where Ceolwulf now ruled as a puppet king with Burgred having gone into exile in Rome.

Despite some victories for Alfred as king up to 878 he was still in a dire position. The Vikings controlled Northumbria, Guthrum held East Anglia, and Mercia was largely dominated by them.